//==================================================================
/// AppBase.cpp
///
/// Created by Davide Pasca - 2009/10/5
/// See the file "license.txt" that comes with this project for
/// copyright info. 
//==================================================================

#include "stdafx.h"
#include <direct.h>
#include "AppBase.h"

//==================================================================
adel<CppKazRace>	gpApp;

//==================================================================
void FWPC_OnCreate( HWND hWnd )
{
	int err = _chdir( "data" );

	if ( err )
		throw std::runtime_error( "Could not change to the Data directory" );

	gpApp = new CppKazRace();

	FWPC_SetEvenCB( CppKazRace::EvenCB_s, gpApp.get() );

	SetWindowPos(
		hWnd,
		0,
		0,
		0,
		640,
		400,
		SWP_NOMOVE | SWP_NOZORDER
		);
}
